WIP Workflows - #1
Closed
jpcamara wants to merge 13 commits into
Closed
Conversation
jpcamara
force-pushed
the
batch-poc--workflows
branch
from
August 2, 2024 21:38
8c98abc to
5844f48
Compare
jpcamara
force-pushed
the
batch-poc--workflows
branch
from
September 9, 2024 16:21
5844f48 to
0b3ce3c
Compare
jpcamara
force-pushed
the
batch-poc--workflows
branch
from
September 21, 2024 22:09
0b3ce3c to
2def3fe
Compare
jpcamara
force-pushed
the
batch-poc--workflows
branch
4 times, most recently
from
September 26, 2024 01:50
9340845 to
91aa981
Compare
* Introduces a "batch" concept, similar to batches present in Sidekiq Pro and GoodJob * Batches monitor a set of jobs, and when those jobs are completed can fire off a final job * This introduces a SolidQueue::JobBatch model, as well as the ability to enqueue jobs and associate them with the batch * There are still more ideas to figure out, but this provides a basic batch scaffolding to spark discussion
* This means we can store the arguments and settings by letting the user do `BatchJob.new(arguments).set(options)` * Yield the batch in `enqueue` in case someone needs info from it * When you serialize then deserialize an activejob instance, the arguments are in the serialized_arguments field and can only be transferred over by the private method `deserialize_arguments_if_needed`. This is pretty janky, so there is probably something i'm missing * `perform_all_later` let's us do a perform_later even with instance, which does not seem to be possible on the instances themselves
* Add spec for adding arguments and options to the batch callback
* Spacing, double quotes * Support Ruby < 3.2 by removing the implicit key/variable syntax
* on_failure fires the first time any of the jobs fail, even once * on_success only fires if all jobs work (after retries) * remove unused job_id
* Allows enqueueing a job within a job, as part of the batch
* Parent batches will not complete until all child batches have been completed
jpcamara
force-pushed
the
batch-poc--workflows
branch
from
September 26, 2024 01:50
91aa981 to
942b971
Compare
jpcamara
force-pushed
the
batch-poc
branch
2 times, most recently
from
November 22, 2024 22:52
1ef7f38 to
8099030
Compare
jpcamara
force-pushed
the
batch-poc
branch
2 times, most recently
from
September 16, 2025 07:10
08ac10b to
ba40df7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.